package com.resys.mappers;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 *  数据库操作接口
 */
@Mapper
public interface RoomdeviceMapper<T,P> extends BaseMapper<T,P> {

	/**
	 * 根据RoomIdAndDeviceId更新
	 */
	 Integer updateByRoomIdAndDeviceId(@Param("bean") T t,@Param("roomId") Integer roomId,@Param("deviceId") Integer deviceId);


	/**
	 * 根据RoomIdAndDeviceId删除
	 */
	 Integer deleteByRoomIdAndDeviceId(@Param("roomId") Integer roomId,@Param("deviceId") Integer deviceId);


	/**
	 * 根据RoomIdAndDeviceId获取对象
	 */
	 T selectByRoomIdAndDeviceId(@Param("roomId") Integer roomId,@Param("deviceId") Integer deviceId);


}
